package study.spring.transaction.aop;

import study.spring.transaction.EditLink;
import study.spring.transaction.InsertOne;
import study.spring.transaction.InsertTwo;

public class JdbcAOPServiceImpl implements JdbcAOPService {

	// private JdbcTemplate template;
	private InsertOne insertOne;
	private InsertTwo insertTwo;

	public void insert(final EditLink t) {
		// String sql =
		// "INSERT INTO tbl_chouti_edit_link (name,img_url,url) VALUES ('6', '/images/image48.png', 'http://www.baidu.com')";
		// template.execute(sql);

		insertOne.add();
		insertTwo.add();

		throw new RuntimeException();

	}

	// ============================
	// public JdbcTemplate getTemplate() {
	// return template;
	// }
	//
	// public void setTemplate(JdbcTemplate template) {
	// this.template = template;
	// }
	public InsertOne getInsertOne() {
		return insertOne;
	}

	public void setInsertOne(InsertOne insertOne) {
		this.insertOne = insertOne;
	}

	public InsertTwo getInsertTwo() {
		return insertTwo;
	}

	public void setInsertTwo(InsertTwo insertTwo) {
		this.insertTwo = insertTwo;
	}
}
